package com.party.mobile.web.dto.photo.output;

import com.google.common.collect.Lists;

import java.io.Serializable;
import java.util.List;

/**
 * @Description: 图片时间线的输出
 * @Author: yangshoukun
 * @Date: 2018/6/5 10:49
 */
public class ImgTimeOutput implements Serializable {

    private static final long serialVersionUID = -1460408672609675651L;
    // 时间线的时间
    private String time;
    // 该时间线下的图片数量(imgs的size)
    private Integer imgNum;
    // 该时间线下的图片
    private List<ImgOutput> imgs = Lists.newArrayList();

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public Integer getImgNum() {
        return imgNum;
    }

    public void setImgNum(Integer imgNum) {
        this.imgNum = imgNum;
    }

    public List<ImgOutput> getImgs() {
        return imgs;
    }

    public void setImgs(List<ImgOutput> imgs) {
        this.imgs = imgs;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof ImgTimeOutput)) return false;

        ImgTimeOutput that = (ImgTimeOutput) o;

        if (time != null ? !time.equals(that.time) : that.time != null) return false;
        if (imgNum != null ? !imgNum.equals(that.imgNum) : that.imgNum != null) return false;
        return imgs != null ? imgs.equals(that.imgs) : that.imgs == null;
    }

    @Override
    public int hashCode() {
        int result = time != null ? time.hashCode() : 0;
        result = 31 * result + (imgNum != null ? imgNum.hashCode() : 0);
        result = 31 * result + (imgs != null ? imgs.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "ImgTimeOutput{" +
                "time='" + time + '\'' +
                ", imgNum=" + imgNum +
                ", imgs=" + imgs +
                '}';
    }
}
